#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int isPalindrome(int x) {
    int tmp = x;
    int rev = 0;
    while (tmp)
    {
        rev = 10 * rev + tmp % 10;
        tmp /= 10;
    }
    if (x == rev&&x>=0)
        return 1;
    else
        return 0;
}
int main()
{
    printf("%d",isPalindrome(1001));
    return 0;
}